package com.xxd;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

@RestController
public class SenderController {
    @Autowired
    SenderSource source;

    @RequestMapping("/send")
    public String sender() {
        source.output().send(MessageBuilder.withPayload("** msg ** : " + UUID.randomUUID()).build());
        return "ok";
    }

}